main(m,n)
{
	for(gets(&m);~scanf("%d%d",&m,&n);printf("%d\n",m/n));
}
